package com.gwclh.personnel.domain;


import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@ApiModel(value = "分页对象")
public class PageDomain {
    /**
     * 当前记录起始索引
     */
    private Integer pageNum;

    /**
     * 每页显示记录数
     */
    private Integer pageSize;

    /**
     * 排序列
     */
    private String sortColumn;

    /**
     * 排序的方向 false "desc"降序 或者 true "asc"升序.
     */
    private Boolean isAsc;

    public OrderItem getOrderItemBy() {
        return new OrderItem().setColumn(sortColumn).setAsc(isAsc);
    }
}
